#include "stdafx.h"

#include "OpenGLSystem.h"
#include "OpenGLDevice.h"
#include "HCM/ComponentRegistry.h"

using namespace Hiranipra;
using namespace Hiranipra::HCM;
using namespace Hiranipra::Platform;
using namespace Hiranipra::Platform::Graphics;

// {01886637-9F7B-443a-866B-991806E1B972}
DEFINE_HCMID( implId ) = { 0x1886637, 0x9f7b, 0x443a, { 0x86, 0x6b, 0x99, 0x18, 0x6, 0xe1, 0xb9, 0x72 } };
REGISTER_COMPONENT_IMPL( Hiranipra::Platform::Graphics::IGraphicsSystem, OpenGLSystem, implId );

OpenGLSystem::OpenGLSystem()
{
}

OpenGLSystem::~OpenGLSystem()
{
}

const vector<Adapter> OpenGLSystem::QueryAdapters()
{
	vector<Adapter> adapters;
	return adapters;
}

const vector<Resolution> OpenGLSystem::QueryResolutions( const Adapter& adapter )
{
	vector<Resolution> resolutions;
	return resolutions;
}

const AdapterCapabilities OpenGLSystem::QueryAdapterCapabilities( const Adapter& adapter )
{
	AdapterCapabilities caps;
	return caps;
}

IGraphicsDevice* OpenGLSystem::CreateDevice( const Adapter& adapter, const Resolution& resolution, const DeviceParameters& parameters )
{
	// TODO: verify parameters
	return new OpenGLDevice( adapter, resolution, parameters );
}
